<!-- user Adminitration video list -->
<!DOCTYPE html>
<html>
<head>
	<% include ../link %>
	<link rel="stylesheet" type="text/css" href="/css/user.css">
</head>
<body>
	<% include ../head %>
	<div class="myself-top-head">
		<img src="/images/myselfTitle.png" class="myself-top-img">
	</div>
	<div class="container">
		<div class="row ">
			<% include ../usermodle %>
			<div class="col-md-8  body-right">
				<% for(var i=0; i < videoList.length; i++){%>
					<div class="col-sm-6 col-md-3" style="height: 190px;border-radius: 6px ;box-shadow: 2px 2px 2px #B5B5B5;">
						<a class="views" target="_blank" href="/video/av/<%-videoList[i]._id%>">
							<img class="index-bg-img" style="width:100%; margin-top: 15px;" src="/video/<%-videoList[i].img%>" alt="...">
							<div class="caption">
								<p title="<%-videoList[i].info%>"><%-videoList[i].name%></p>
							</div>
						</a>
						<button class="delete button button-primary button-rounded button-small" style="margin: 0px auto;display: block;" data-av="<%-videoList[i]._id%>" data-path="<%-videoList[i].path%>">delete</button>
					</div>
				<%}%>
	  		</div>
		</div>
	</div>

	<% include ../foot %>
</body>
<script>
	var del = $('.delete')
	del.click(function(){
		var avid = $(this).data('av')
		var path = $(this).data('path')
		$.ajax({
			type:'delete',
			url:'/ces/adminivideo',
			cache:false,
			data:{
				av:avid,
				path:path
			},
			success:function(data){
				console.log('Ok??')
			}
		})
	})
</script>
</html>